﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace ProjectEuler
{
    internal class Problem2
    {
        public void Solve()
        {
            var numbers = new List<int>();
            
            int a;
            int b = 1;
            int c = 2;

            do
            {
                if (c % 2 == 0) numbers.Add(c);
                a = b;
                b = c;
                c = a + b;

            } while (c < 4000000);

            var sum = numbers.Sum();
            Console.WriteLine("problem 2: " + sum);
        }
    }
}